(function(win, undefined) {
	const jQuery = function(selector, context) {
		return new jQuery.fn.init(selector, context);
	};

	jQuery.fn = jQuery.prototype = {
		length: 0,
		push: [].push,
		sort: [].sort,
		splice: [].splice,
		constructor: jQuery,
	};
	const init = jQuery.fn.init = function( selector, context, root ) {
		if(!selector) {
			return this;
		}
		const ret = document.querySelectorAll(selector);
		
		ret.forEach((item, index) => {
			this[index] = item;
		});
		this.length = ret.length;

		return this;
	};

	jQuery.fn.init.prototype = jQuery.fn;

	win.myjQuery = win.$$ = jQuery;
})(window);